<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>JavaScript常用控制语句—for</title>
</head>
<body>
<script>
  //for循环
  const array = [1, 3, 5, 10, 12, 15, 20];
  for (let i = 0; i < array.length; i++) {
    console.log(i,"==>", array[i]);
  }
</script>
</body>
</html>